package com.pks.datacenter.config;

public class RedisKeyConfig {
	
	// 定义全局缓存时间
	public static final long CACHE_TIME = 10 * 24 * 3600  ;
	
	/** api接口中记录获取token时间，用做判断两次获取token限制 10分钟内*/
	public static final String KEY_API_GETTOKENTIME_PREFIX = "datacenter_cache:api:gettokentime:";
	/** apitoken记录 有效期4小时*/
	public static final String KEY_API_TOKEN_PREFIX = "datacenter_cache:api:token:";
	/** 接口调用记录 */
	public static final String KEY_API_RECORD = "datacenter_cache:api:record:";
	/** 接口最后调的时间 做两次调用间隔判断使用 */
	public static final String KEY_API_LASTUSETIME = "datacenter_cache:api:last_use_time:";
	

	/** 某 接口下的 接口参数列表  */
	public static final String KEY_LIST_APIPARAMS_PREFIX = "datacenter_cache:list:apiparams:";
	/** 某接口下的展示字段列表 */
	public static final String KEY_LIST_APIFIELDS_PREFIX = "datacenter_cache:list:apifields:";
	/** 某接口账号对应的接口权限列表 */
	public static final String KEY_LIST_APIUSER_PERM_PREFIX = "datacenter_cache:list:apiperm:";
	/** 某数据源下的数据源字段列表 */
	public static final String KEY_LIST_DBFIELD_PREFIX = "datacenter_cache:list:dbfield:";
	/** 某类型的标签数据 */
	public static final String KEY_LIST_TAGS_PREFIX = "datacenter_cache:list:tags";
	
	/** 接口方法（对应路由地址）对应的接口 */
	public static final String KEY_INFO_METHODNAME_PREFIX = "datacenter_cache:info:methodname:";
	/** 接口方法信息  接口id*/
	public static final String KEY_INFO_APIMETHOD_PREFIX = "datacenter_cache:info:apimethod:";
	/** 接口账号信息 */
	public static final String KEY_INFO_APIUSER_PREFIX = "datacenter_cache:info:apiuser:";
	/** 数据源信息 */
	public static final String KEY_INFO_DBINFO_PREFIX = "datacenter_cache:info:dbinfo:";
	/** HTTP数据源鉴权值 */
	public static final String KEY_INFO_DBINFO_AUTHVALUE_PREFIX = "datacenter_cache:info:dbinfo-authvalue:";
	/** 登录信息随机生成的token对应登录信息 */
	public static final String KEY_LOGIN_TOKEN = "datacenter_cache:user:login_token:";
	/** 云平台 接口APITOKEN */
	public static final String KEY_YUN_APITOKEN = "datacenter_cache:yun_api:apitoken"; 
	
}
